﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using ViewModels;

namespace ViewComponents
{
	/// <summary>
	/// Interaction logic for LiteralRangeControl.xaml
	/// </summary>
	public partial class LiteralRangeControl  {

		public LinkedRangesViewModel ViewModel { get; set; }

		public LiteralRangeControl()
		{
			InitializeComponent();
		}

        private void GetRangeButton_Click(object sender, RoutedEventArgs e)
        {
            //ViewModel.SetSourceRange();

            GetRangeControl control = new GetRangeControl();
            control.ViewModel = ViewModel;
            control.Show(new WindowWrapper(ViewModel.Application.Hwnd));
        }

        private void GetWorkbookNameButton_Click(object sender, RoutedEventArgs e)
        {
            ViewModel.SetSourceWorkbook();
        }

        private void DoneButton_Click(object sender, RoutedEventArgs e)
        {            
            ViewModel.UpdateSelected();
        }

        
	}
}
